local Locales = {
	["Grond the Corpsemaker"] = {
		[1] = "Grond the Corpsemaker",
		[2] = "Grond der Leichenmacher",
		[3] = "Grond le Boucher",
	},
	["Scratch Itch"] = { --58769
		[1] = "Scratch Itch",
		[2] = "Wegen Juckreiz kratzen",
		[3] = "Griffure de démangeaison",
	},
	["Thrash"] = { --40109
		[1] = "Thrash",
		[2] = "Dreschen",
		[3] = "Raclée",
	},
	["Bellow"] = { --37585
		[1] = "Bellow",
		[2] = "Gebrüll",
		[3] = "Cri",
	},
	["Get ready to trap adds!"] = {
		[1] = "Get ready to trap adds!",
		[2] = "Vorbereiten die Adds in die Fallen zu locken!",
		[3] = "Get ready to trap adds!",
	},

}

local function RKVGrond(tUnits)
	local currTime = GameLib.GetGameTime()
	for unitid, unitdata in pairs(tUnits) do
		local unitname = unitdata.unit:GetName()
		if unitname == Raiderino.L["Grond the Corpsemaker"] then
			local castname = Raiderino:GetCast(unitid,unitdata.unit)
			if castname then
				if castname == Raiderino.L["Scratch Itch"] then
					if Raiderino:FeatureCheck("Grond the Corpsemaker","Scratch Itch") then
						local msg = {text = "Get ready to trap adds!", maxtime = 5, icon = nil, destroyAtEnd = false}
						Raiderino.notifications:AddTimer(msg)
					end
				elseif castname == Raiderino.L["Thrash"] then
					if Raiderino:FeatureCheck("Grond the Corpsemaker","Thrash") then
						local msg = {text = "Thrash", maxtime = 30, icon = nil, destroyAtEnd = false}
						Raiderino.timers:AddTimer(msg)
					end
				elseif castname == Raiderino.L["Bellow"] then
					if Raiderino:FeatureCheck("Grond the Corpsemaker","Bellow") then
						local msg = {text = "Bellow", maxtime = 28, icon = nil, destroyAtEnd = false}
						Raiderino.timers:AddTimer(msg)
					end
				else
					Raiderino:UntimedCastAdd(unitname,castname)
				end
			end
		end
	end
end

local function PhaseGrond(phase)

end

local function StartGrond()

end

local encounteroptions = {
	enabled = true,
	position = 1,
	zone = "Ruins of Kel Voreth",
	fBossFunction = RKVGrond,
	fPhaseFunction = PhaseGrond,
	fOnStartCombat = StartGrond,
	features = {
		["Scratch Itch"] = {
			displayname = "Scratch Itch",
			enabled = true
		},
		["Thrash"] = {
			displayname = "Thrash",
			enabled = true
		},
		["Bellow"] = {
			displayname = "Bellow",
			enabled = true
		},
	},
}

if _G["RaiderinoLibs"] == nil then
	_G["RaiderinoLibs"] = { }
end
if _G["RaiderinoLibs"]["Encounters"] == nil then
	_G["RaiderinoLibs"]["Encounters"] = { }
end

_G["RaiderinoLibs"]["Encounters"]["Grond the Corpsemaker"] = encounteroptions

if _G["RaiderinoLibs"]["Locales"] == nil then
	_G["RaiderinoLibs"]["Locales"] = { }
end
for locale, localedata in pairs(Locales) do
	if not RaiderinoLibs.Locales[locale] then
		RaiderinoLibs.Locales[locale] = {}
		for i,localestring in pairs(localedata) do
			RaiderinoLibs.Locales[locale][i] = localestring
		end
	end
end